package com.sanyu.controller.admin;

import com.sanyu.pojo.dto.AdminDTO;
import com.sanyu.pojo.dto.AdminLoginDTO;
import com.sanyu.pojo.dto.UpdatePasswordDTO;
import com.sanyu.pojo.dto.UserDTO;
import com.sanyu.pojo.vo.AdminLoginVO;
import com.sanyu.pojo.vo.AdminVO;
import com.sanyu.pojo.vo.UserVO;
import com.sanyu.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/admin")
@Api("后台管理页面/管理员用户相关接口")
public class AdminController {

    @PostMapping("/login")
    @ApiOperation("管理员登录")
    public Result login(@RequestBody AdminLoginDTO adminLoginDTO){
        AdminLoginVO adminLoginVO = new AdminLoginVO();
        return Result.success(adminLoginVO);
    }

    @PutMapping("/password")
    @ApiOperation("修改密码")
    public Result updatePwd(@RequestBody UpdatePasswordDTO updatePasswordDTO){
        return Result.success();
    }

    @PutMapping
    @ApiOperation("修改用户信息")
    public Result update(@RequestBody AdminDTO adminDTO){
        return Result.success();
    }

    @GetMapping
    @ApiOperation("查询当前管理员用户信息")
    public Result<AdminVO> detail(){
        return Result.success(new AdminVO());
    }
}
